<template>
	<view class="wrap">
		<u-navbar title="现货机器人设置" title-width="340" :border-bottom="false" back-icon-color="#fff" title-color="#fff" :background="{ backgroundColor: '#0030A8' }"></u-navbar>
		<view class="tom-container">
			<view class="list">
				<view class="nr_top">
					<view class="left">
						<image class="left_img" :src="`/static/bizhong/${exchangeCoin_img}.png`"></image>
						<view class="left_select">
							<view class="text">{{ exchangeCoin }}</view>
							<u-icon name="you" custom-prefix="custom-icon" size="20"></u-icon>
						</view>
					</view>
					<view class="right">
						<view class="right_xin" style="margin-bottom: 40upx;">
							<view class="right_xin_left">交易所</view>
							<view class="right_xin_right">
								<view class="label">{{ list2_item.label }}</view>
								<u-icon name="you" custom-prefix="custom-icon" size="20"></u-icon>
							</view>
						</view>
						<view class="right_xin">
							<view class="right_xin_left">交易策略</view>
							<view class="right_xin_right">
								<view class="label">{{ list3[0].label }}</view>
								<u-icon name="you" custom-prefix="custom-icon" size="20"></u-icon>
							</view>
						</view>
					</view>
				</view>
				<!-- <view class="nr_item">
					<view class="nr_item_left">策略选择：</view>
					<view class="nr_item_right">
						<view class="strategy">
							<view class="strategy-item" @tap="switchStrategy(index)" v-for="(item, index) in strategyList" :key="index" :class="{ active: strategy == index }">
								{{ item.label }}
							</view>
						</view>
					</view>
				</view> -->
				<view class="nr_item" v-if="strategy == 3" style="align-items:baseline;">
					<view class="nr_item_left">已保存策略：</view>
					<view class="nr_item_right">
						<view class="strategy">
							<text
								style="margin-bottom:20rpx;"
								@tap="confirmStr(index)"
								v-for="(item, index) in Strategy"
								:key="index"
								class="strategy-item"
								:class="{ active: StrategyIndex == index }"
							>
								{{ item.label }}
							</text>
							<view @tap="plusStrategy('plus')" class="strategy-item active strategy-item_plus" style="margin-bottom: 20rpx;" v-if="this.Strategy.length < 5">
								<u-icon name="plus" color="'#2BE8B7" size="28"></u-icon>
							</view>
						</view>
					</view>
				</view>
				<view class="nr_item" v-if="strategy == 3 && Strategy.length != 0">
					<view class="nr_item_left">自定义策略操作：</view>
					<view class="nr_item_right">
						<view class="dyi_Strategy">
							<text @tap="plusStrategy('modify')" class="dyi_Strategy-item active">修改</text>
							<text @tap="Delete()" class="dyi_Strategy-item">删除</text>
						</view>
					</view>
				</view>
				<view class="nr_item nr_item_border">
					<view class="nr_item_left">策略id：</view>
					<view class="nr_item_right">
						<view class="nr_item_right_id">
							{{pageData.tacticsId}}
							<u-icon name="fuzhi" custom-prefix="custom-icon" size="28" @tap="copy(pageData.tacticsId)" style="margin-left: 16rpx;"></u-icon>
						</view>
					</view>
				</view>
				<view class="nr_item nr_item_border">
					<view class="nr_item_left">首单额度：</view>
					<view class="nr_item_right">
						<view class="limit">
							<input class="limit-input" type="digit" v-model="firstAmount" placeholder-class="place" :placeholder="`最低${minFirstAmount || ''}`" />
							<text class="limit-text">USDT</text>
						</view>
					</view>
				</view>
				<view class="nr_item nr_item_border">
					<view class="nr_item_left">做单次数：</view>
					<view class="nr_item_right">
						<view class="limit">
							<input class="limit-input" type="digit" v-model="doAmount" placeholder-class="place" placeholder="最少1" />
							<text class="limit-text" v-if="!doAmount">单次策略/循环策略</text>
							<text class="limit-text" v-if="doAmount == 1">单次策略</text>
							<text class="limit-text" v-if="doAmount > 1">循环策略</text>
						</view>
					</view>
				</view>
				<view class="nr_item nr_item_border" v-if="doAmount >=2">
					<view class="nr_item_left">首单跌幅：</view>
					<view class="nr_item_right">
						<view class="limit">
							<input class="limit-input" type="digit" v-model="firstDecline" placeholder-class="place" :placeholder="`最低${pageData.minPatchDelineNewRound}`" :maxlength="10" />
							<text class="limit-text">{{ $BigNumber(firstDecline || 0).multipliedBy(100) }}%</text>
							<u-icon name="wenhao" color="#333" custom-prefix="custom-icon" size="35" @tap="Strategy_tips()"></u-icon>
						</view>
					</view>
				</view>
				<view class="nr_item nr_item_border">
					<view class="nr_item_left">止盈比例：</view>
					<view class="nr_item_right">
						<view class="limit">
							<input class="limit-input" type="digit" v-model="stopScale" placeholder-class="place" :placeholder="`最低${minStopScale}`" :maxlength="10" />
							<text class="limit-text">{{ $BigNumber(stopScale || 0).multipliedBy(100) }}%</text>
						</view>
					</view>
				</view>
				<view class="nr_item nr_item_border">
					<view class="nr_item_left">止盈回调：</view>
					<view class="nr_item_right">
						<view class="limit">
							<input class="limit-input" type="digit" v-model="stopBack" placeholder-class="place" :placeholder="`最低${minStopBack}`" :maxlength="10" />
							<text class="limit-text">{{ $BigNumber(stopBack || 0).multipliedBy(100) }}%</text>
						</view>
					</view>
				</view>
				<view class="nr_item nr_item_border">
					<view class="nr_item_left">补仓跌幅</view>
					<view class="nr_item_right"></view>
				</view>
				<view class="nr_item nr_item_border" v-for="(item, index) in sevenCovers" :key="index">
					<view class="nr_item_left">第{{ index + 1 }}次补仓跌幅：</view>
					<view class="nr_item_right">
						<view class="limit">
							<input class="limit-input" type="digit" v-model="item.value" placeholder-class="place" :placeholder="`最低${minPatchDeclines[index]}`" :maxlength="10" />
							<text class="limit-text">{{ $BigNumber(item.value || 0).multipliedBy(100) }}%</text>
							<view v-if="index == sevenCovers.length - 1" class="buyin-plusreduce">
								<u-icon @tap="plusReduce('plus', index)" name="plus" :color="index == 6 ? '#CCC' : '#0030A8'" size="28"></u-icon>
								<text class="buyin-plusreduce-line"></text>
								<u-icon @tap="plusReduce('reduce', index)" name="minus" :color="index == 0 ? '#CCC' : '#0030A8'" size="28"></u-icon>
							</view>
						</view>
					</view>
				</view>
				<view class="nr_item nr_item_border">
					<view class="nr_item_left">补仓回调幅度：</view>
					<view class="nr_item_right">
						<view class="limit">
							<input class="limit-input" type="digit" v-model="patchBack" placeholder-class="place" :placeholder="`最低${minPatchBack}`" :maxlength="10" />
							<text class="limit-text">{{ $BigNumber(patchBack || 0).multipliedBy(100) }}%</text>
						</view>
					</view>
				</view>
				<view class="btn_success"><text class="text" @click="quantifyRobotOpen">确定保存</text></view>
			</view>
		</view>
		<tom-pwd v-if="showPwd" @cancel="back" @confirm="confirm"></tom-pwd>
		<u-toast ref="uToast" />
	</view>
</template>

<script>
export default {
	data() {
		return {
			id: '',
			list: [
				{
					img: ''
				}
			],
			list_imdex: 0,
			list2: [
				{
					value: '',
					label: '火币'
				}
			],
			list2_item: {
				value: 'HUOBI',
				label: '火币交易所'
			},
			list3: [
				{
					value: '1',
					label: '马丁倍投'
				}
			],
			show: false,
			show2: false,
			show3: false,
			show_editing: false,
			Strategy: [
				{
					extra: 0,
					label: 'hhh',
					value: {
						createDate: '2021-06-16 19:55:52',
						exchangeName: 'HUOBI',
						firstAmount: 10,
						id: 18,
						patchBack: 1,
						patchDeclineFive: 1,
						patchDeclineFour: 1,
						patchDeclineOne: 1,
						patchDeclineSeven: 1,
						patchDeclineSix: 1,
						patchDeclineThree: 1,
						patchDeclineTwo: 1,
						quantifyType: 'SPOT',
						stopBack: 1,
						stopScale: 10,
						tacticsName: 'hhh',
						tacticsType: 1,
						updateDate: '2021-06-16 19:55:52',
						userId: 13650
					}
				}
			] /*已保存策略列表*/,
			showStrategy: false,
			StrategyIndex: 0,
			show: false /*自定义编辑策略*/,
			StrategyTitle: '新增',
			Type: 1 /*请求类型 1配置机器人 0修改/新增策略 2策略删除*/,
			StrategyID: 1 /*策略自定义类型 1修改 0新增 */,
			tacticsName: '' /*自定义参数名称*/,
			showPwd: false,
			pageData: {},
			// 机器人类型列表
			quantifyTypes: [],
			// 当前选中机器人类型
			quantifyType: '',
			// 交易所列表
			bourseList: [],
			// 当前选中交易所索引
			bourseCur: 0,
			showCoinsList: false,
			// 当前选中交易币种对索引
			coinCur: 0,
			// 策略选择列表
			strategyList: [
				{ label: '激进', value: 'radicalQuantifyTacticsNode' },
				{ label: '平衡', value: 'poiseQuantifyTacticsNode' },
				{ label: '保守', value: 'keepQuantifyTacticsNode' },
				{ label: '自定义', value: 'custom' }
			],
			// 选中策略索引
			strategy: 1,
			// 策略配置
			strategySetting: {},
			// 首单额度
			firstAmount: '',
			// 首单跌幅
			firstDecline: '',
			// 做单次数
			doAmount: '',
			// 止盈比例
			stopScale: '',
			// 止盈回调
			stopBack: '',
			// 补仓跌幅(最多七次)
			sevenCovers: [],
			// 补仓回调幅度
			patchBack: '',
			exchangeCoin: '',
			exchangeCoin_img: '',
			minFirstAmount: '' /*最低额度*/,
			minStopScale: '' /*最低止盈比例*/,
			minStopBack: '' /*最低止盈回调比例*/,
			minPatchBack: '' /*最低补仓回调比例*/
		};
	},
	computed: {
		minPatchDeclines() {
			return this.pageData.minPatchDeclines || [];
		},
		coinsList() {
			if (!this.bourseList[this.bourseCur]) return [];
			let arr = this.bourseList[this.bourseCur]['exchangeCoinList'] || [];
			let coinsList = [];
			arr.forEach((item, index) => {
				coinsList.push({
					label: item,
					value: index
				});
			});
			return coinsList;
		},
		sevenMinCovers() {
			let key = this.strategyList[this.strategy]['value'];
			if (key == 'custom') {
				key = 'keepQuantifyTacticsNode';
			}
			if (!this.pageData[key]) return '';
			return this.pageData[key]['sevenMinCovers'];
		}
	},
	created() {
		this.indexData();
	},
	onLoad(info) {
		this.id = info.id;
	},
	methods: {
		indexData() {
			uni.showLoading({
				mask: true,
				title: '加载中...'
			});
			this.$api.consoleApi
				.getRobotModify({
					tacticsId: this.id
				})
				.then(res => {
					this.pageData = res.data;
					this.exchangeCoin = res.data.exchangeCoin;
					let str = res.data.exchangeCoin;
					let str_index = str.lastIndexOf('/');
					this.exchangeCoin_img = str.substring(0, str_index);
					this.list3[0].label = res.data.tacticsTypeName;
					this.stopScale = Number(this.pageData.stopScale);
					this.stopBack = Number(this.pageData.stopBack);
					this.patchBack = Number(this.pageData.patchBack);
					this.firstAmount = Number(this.pageData.firstAmount);
					this.doAmount = Number(this.pageData.tacticsType);
					this.minFirstAmount = Number(this.pageData.minFirstAmount);
					this.minStopScale = Number(this.pageData.minStopScale);
					this.minStopBack = Number(this.pageData.minStopBack);
					this.minPatchBack = Number(this.pageData.minPatchBack);
					let arr = [];
					res.data.patchDeclines.forEach(item => {
						arr.push({ value: Number(item) });
					});
					this.sevenCovers = arr;
					if(Number(this.pageData.tacticsType) >=2){
						this.firstDecline = res.data.patchNewRound;
					}
					
					/**/

					/**/

					uni.hideLoading();
				})
				.catch(res => {
					uni.hideLoading();
				});
		},
		copy(val){
			this.$utils.copy(val);
		},
		Strategy_tips(){
			this.$refs.uToast.show({
				title: '新一轮首单下单点位，参考每轮结束时的止盈价开始计算跌幅的比例',
				type: 'warning',
				duration: 3000,
				icon: false
			});
		},
		// 切换策略
		switchStrategy(i) {
			if (this.strategy == i) return;
			this.strategy = i;
			this.setDefault();

			console.log(this.strategy);
		},
		/*自定义编辑策略 修改/新增*/
		plusStrategy(type) {
			console.log(this.Strategy.length > 5);
			if (this.Strategy.length < 5 || type == 'modify') {
				this.show_editing = true;
			}
			if (type == 'plus' && this.Strategy.length < 5) {
				this.StrategyTitle = '新增';
				this.StrategyID = 0;
				this.tacticsName = '';
				this.setmin();
			} else {
				this.StrategyTitle = '修改';
				this.StrategyID = 1;
				this.tacticsName = this.Strategy[this.StrategyIndex].label;
			}
		},
		editing_ok() {
			this.public_yz();
			this.Type = 0;
		},
		/*自定义策略-切换*/
		confirmStr(e) {
			this.StrategyIndex = e;
			let arr = [];
			this.pageData.keepQuantifyTacticsNode.sevenMinCovers.forEach(item => {
				arr.push({ value: '' });
			});
			this.sevenCovers = arr;
			console.log(this.pageData.keepQuantifyTacticsNode.sevenMinCovers);
			console.log(this.sevenCovers);
			this.public_assignment(e);
		},
		public_assignment(e) {
			if (this.Strategy.length > 0) {
				this.firstAmount = this.Strategy[e].value.firstAmount;
				this.doAmount = this.Strategy[e].value.tacticsType;
				this.stopScale = this.Strategy[e].value.stopScale;
				this.stopBack = this.Strategy[e].value.stopBack;
				this.patchBack = this.Strategy[e].value.patchBack;
				this.sevenCovers[0]['value'] = this.Strategy[e].value.patchDeclineOne;
				this.sevenCovers[1]['value'] = this.Strategy[e].value.patchDeclineTwo;
				this.sevenCovers[2]['value'] = this.Strategy[e].value.patchDeclineThree;
				this.sevenCovers[3]['value'] = this.Strategy[e].value.patchDeclineFour;
				this.sevenCovers[4]['value'] = this.Strategy[e].value.patchDeclineFive;
				this.sevenCovers[5]['value'] = this.Strategy[e].value.patchDeclineSix;
				this.sevenCovers[6]['value'] = this.Strategy[e].value.patchDeclineSeven;
			}
		},
		// 给当前策略赋值默认值
		setDefault() {
			if (this.strategy == 3) {
				if (this.Strategy.length) {
					this.public_assignment(0);
				} else {
					this.setmin();
				}

				return;
			}
			this.firstAmount = this.strategyCurSetting.defFirstAmount;
			this.doAmount = this.strategyCurSetting.doAmount;
			this.stopScale = this.strategyCurSetting.defStopScale;
			this.stopBack = this.strategyCurSetting.defStopBack;
			this.patchBack = this.strategyCurSetting.defPatchBack;
			let arr = [];
			this.strategyCurSetting.sevenDefCovers.forEach(item => {
				arr.push({ value: item });
			});
			this.sevenCovers = arr;
		},
		// 给当前策略赋值最小值
		setmin() {
			this.firstAmount = '';
			this.doAmount = '';
			this.stopScale = '';
			this.stopBack = '';
			this.patchBack = '';
			let arr = [];
			this.pageData.keepQuantifyTacticsNode.sevenMinCovers.forEach(item => {
				arr.push({ value: '' });
			});
			this.sevenCovers = arr;
		},
		// 加减
		plusReduce(type, index) {
			if (type == 'plus') {
				if (index == 6) return;
				this.sevenCovers.push({ value: Number(this.$BigNumber(this.minPatchDeclines[index])) });
			} else {
				if (index == 0) return;
				this.sevenCovers.splice(index, 1);
			}
		},
		// 开通机器人
		public_yz() {
			if (this.show) {
				if (this.tacticsName == '') return this.$utils.toast(`请输入自定义参数名称`);
			}
			if (this.firstAmount < this.minFirstAmount) return this.$utils.toast(`首单额度最低${this.minFirstAmount}`);
			if (this.doAmount < 1) return this.$utils.toast(`做单次数最少1`);
			if (this.stopScale < this.minStopScale) return this.$utils.toast(`止盈比例最低${this.minStopScale}`);
			// if (Number(this.stopScale) > 10) return this.$utils.toast(`请输入10倍以内的止盈比例`);
			if (this.stopBack < this.pageData.minStopBack) return this.$utils.toast(`止盈回调最低${this.pageData.minStopBack}`);
			if(this.doAmount >='2'){
				if (this.firstDecline == '') return this.$utils.toast(`请输入首单跌幅`);
				if (Number(this.firstDecline) < this.pageData.minPatchDecineNewRound) return this.$utils.toast(`首单跌幅最低${this.minStopBack}`);
			}
			for (let i = 0; i < this.sevenCovers.length; i++) {
				if (this.sevenCovers[i]['value'] < this.minPatchDeclines[i]) {
					this.$utils.toast(`第${i + 1}次补仓跌幅最低${this.minPatchDeclines[i]}`);
					return false;
				}
			}
			if (this.patchBack < this.minPatchBack) return this.$utils.toast(`补仓回调幅度最低${this.minPatchBack}`);
			this.showPwd = true;
		},
		quantifyRobotOpen() {
			this.public_yz();
		},
		confirm(e) {
			/*交易密码正确回调*/
			this.showPwd = false;
			let params = {};
			console.log(this.Strategy[this.StrategyIndex]);
			if (this.doAmount >='2') {
				params.patchDeclineNewRound = Number(this.firstDecline);
			}
			if (this.sevenCovers[0]) {
				params.patchDeclineOne = this.sevenCovers[0]['value'];
			}
			if (this.sevenCovers[1]) {
				params.patchDeclineTwo = this.sevenCovers[1]['value'];
			}
			if (this.sevenCovers[2]) {
				params.patchDeclineThree = this.sevenCovers[2]['value'];
			}
			if (this.sevenCovers[3]) {
				params.patchDeclineFour = this.sevenCovers[3]['value'];
			}
			if (this.sevenCovers[4]) {
				params.patchDeclineFive = this.sevenCovers[4]['value'];
			}
			if (this.sevenCovers[5]) {
				params.patchDeclineSix = this.sevenCovers[5]['value'];
			}
			if (this.sevenCovers[6]) {
				params.patchDeclineSeven = this.sevenCovers[6]['value'];
			}
			if (this.Type == 1) {
				uni.showLoading({
					mask: true,
					title: '正在提交...'
				});
				/*运行机器人接口*/
				this.$api.consoleApi
					.quantifyRobotModify({
						firstAmount: this.firstAmount,
						stopScale: this.stopScale,
						stopBack: this.stopBack,
						patchBack: this.patchBack,
						...params,
						address: this.address,
						tacticsType: this.doAmount,
						quantifyType: 'SPOT',
						exchangeName: this.pageData.exchangeName,
						exchangeCoin: this.pageData.exchangeCoin,
						transferPassword: e,
						id:this.id,
					})
					.then(res => {
						this.$utils.toast('操作成功');
					});
			} else if (this.Type == 0) {
				if (this.StrategyID && this.strategy == 3 && this.Strategy[this.StrategyIndex]) {
					params.id = this.Strategy[this.StrategyIndex].value.id;
				}
				uni.showLoading({
					mask: true,
					title: '正在提交...'
				});
				/*自定义策略接口*/

				this.$api.consoleApi
					.saveCustomizeQuantify({
						transferPassword: e,
						tacticsName: this.tacticsName,
						firstAmount: this.firstAmount,
						stopScale: this.stopScale,
						stopBack: this.stopBack,
						patchBack: this.patchBack,
						...params,
						tacticsType: this.doAmount,
						quantifyType: this.quantifyType,
						exchangeName: this.bourseList[this.bourseCur]['exchangeName'],
						quantifyType: 'SPOT'
					})
					.then(res => {
						this.$utils.toast('操作成功');
						this.show = false;
						this.show_editing = false;
						this.Type = 1;
						this.indexData();
					})
					.catch(res => {
						this.Type = 1;
					});
			} else {
				console.log('删除');
				this.$api.consoleApi
					.deleteCustomizeQuantify({
						id: this.Strategy[this.StrategyIndex].value.id,
						transferPassword: e
					})
					.then(res => {
						this.$utils.toast('操作成功');
						this.indexData();
						this.show = false;
						this.Type = 1;
					})
					.catch(res => {
						this.Type = 1;
					});
			}
		},
		back() {
			/*验证密码关闭回调*/
			this.showPwd = false;
			this.Type = 1;
		},
		Delete() {
			console.log(this.Strategy[this.StrategyIndex].value.id);
			this.showPwd = true;
			this.Type = 2;
		}
	}
};
</script>

<style lang="scss" scoped>
.tom-container {
	padding-top: 50rpx;
}
.list {
	flex: 1;
	border-radius: 50rpx 50rpx 0rpx 0rpx;
	overflow: auto;
	background-color: #fff;
	.nr_top {
		display: flex;
		align-items: center;
		padding: $nr-padd;
		border: 2rpx solid $page-bg;
		.left {
			min-width: 200rpx;
			text-align: center;
			.left_img {
				width: 80rpx;
				height: 80rpx;
				margin-left: -30rpx;
				margin-bottom: 30rpx;
			}
			.left_select {
				display: flex;
				align-items: center;
				justify-content: center;
				.text {
					font-weight: bold;
					font-size: 28rpx;
					margin-right: 10rpx;
				}
				.u-icon {
					transform: rotate(90deg);
				}
			}
		}
		.right {
			width: 100%;
			margin-left: 50rpx;
			.right_xin {
				display: flex;
				justify-content: space-between;
				.right_xin_left {
					color: $tom-text-color;
					font-size: 28rpx;
					font-weight: bold;
				}
				.right_xin_right {
					color: $tom-text-sub-color2;
					display: flex;
					.label {
						font-size: 28rpx;
						margin-right: 20rpx;
					}
					.u-icon {
						transform: rotate(90deg);
					}
				}
			}
		}
	}
	.nr_item {
		padding: 18rpx $nr-padd;
		border: 2rpx solid $page-bg;
		display: flex;
		align-items: center;
		.nr_item_left {
			white-space: nowrap;
			font-weight: bold;
			font-size: 28rpx;
		}
		.nr_item_right {
			.strategy {
				display: flex;
				.strategy-item {
					color: $tom-text-sub-color;
					font-size: 28rpx;
					margin: 0px 20rpx;
				}
				.active {
					color: $text-color;
				}
				.strategy-item_plus {
					border: 2rpx solid $text-color;
					padding: 6rpx 20rpx;
					margin-top: -8rpx;
				}
			}
			.dyi_Strategy {
				display: flex;
				.dyi_Strategy-item {
					color: $tom-text-sub-color;
					font-size: 28rpx;
					margin: 0px 20rpx;
					border: 2rpx solid $tom-text-sub-color;
					padding: 6rpx 20rpx;
				}
				.active {
					color: $text-color;
					border-color: $text-color;
				}
			}
			.limit {
				display: flex;
				align-items: center;
				&-input {
					width: 200rpx;
					height: 50rpx;
					border: 1px solid $tom-text-sub-color;
					border-radius: 4rpx;
					color: $text-color;
					font-size: 24rpx;
					padding: 0 20rpx;
					box-sizing: border-box;
				}
				&-text {
					margin-left: 20rpx;
					color: $tom-text-color;
					font-size: 24rpx;
					margin-right: 10rpx;
				}
				.buyin-plusreduce {
					margin-left: 30rpx;
					width: 104rpx;
					height: 40rpx;
					padding: 0 10rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;
					border: 1px solid $text-color;
					border-radius: 8rpx;
					.buyin-plusreduce-line {
						width: 1px;
						height: 20rpx;
						background-color: #2a405c;
					}
				}
			}
		}
	}
	.nr_item_border {
		border: none;
	}
	.btn_success {
		width: 240rpx;
		height: 80rpx;
		background-color: $text-color;
		color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 10rpx;
		margin: 50rpx auto;
		.text {
			font-size: 32rpx;
			font-weight: bold;
		}
	}
}
.pop_editing {
	background-color: #fff;
	.title {
		text-align: center;
		color: $text-color;
		font-size: 34rpx;
		font-weight: bold;
		padding: $nr-padd;
	}
	.pop_editing_btn {
		display: flex;
		justify-content: space-around;
		padding: 40rpx 0rpx;
		.btn {
			width: 200rpx;
			height: 80rpx;
			line-height: 78rpx;
			background-color: $text-color;
			border-radius: 10rpx;
			text-align: center;
			font-size: 32rpx;
			color: #fff;
			box-sizing: border-box;
		}
		.active {
			border: 2rpx solid $tom-text-sub-color2;
			background-color: #fff;
			color: $tom-text-sub-color2;
		}
	}
}
.pop_editing {
	.nr_item {
		padding: 12rpx $nr-padd;
	}
}
</style>
